import request from '@/utils/request'

// 查询qualityInfo列表
export function listQualityInfo(query) {
  return request({
    url: '/qualityInfo/list',
    method: 'get',
    params: query
  })
}

// 查询qualityInfo详细
export function getQualityInfo(inspectionNo) {
  return request({
    url: '/qualityInfo/' + inspectionNo,
    method: 'get'
  })
}

// 新增qualityInfo
export function addQualityInfo(data) {
  return request({
    url: '/qualityInfo',
    method: 'post',
    data: data
  })
}

// 修改qualityInfo
export function updateQualityInfo(data) {
  return request({
    url: '/qualityInfo',
    method: 'put',
    data: data
  })
}

// 删除qualityInfo
export function delQualityInfo(inspectionNo) {
  return request({
    url: '/qualityInfo/' + inspectionNo,
    method: 'delete'
  })
}

//根据订单编号获取qualityInfo列表
export function listQualityInfoByOrderNo(orderNo) {
  return request({
    url: '/qualityInfo/orderNo',
    method: 'post',
    data: orderNo
  })
}
